import request from '@/utils/request';

/**
 * 获取绩效考核列表
 */
export const getAttendanceList_API = async (params: any) => await request.get('/api/getAttendanceList');

/**
 * 获取绩效考核详情
 */
export const getAttendanceDetail_API = async (params: any) => await request.get(`/api/getAttendanceDetail/${params.attendanceId}`);

/**
 * 添加绩效考核（仅管理员）
 */
export const addAttendance_API = async (params: any) => await request.post('/api/addAttendance', params);

/**
 * 删除绩效考核（仅管理员）
 */
export const deleteAttendance_API = async (params: any) => await request.put(`/api/deleteAttendance/${params.attendanceId}`);

/**
 * 修改绩效考核（仅管理员）
 */
export const updateAttendance_API = async (params: any) => await request.put(`/api/updateAttendance/${params.attendanceId}`, params);


export default {
  getAttendanceList_API,
  getAttendanceDetail_API,
  addAttendance_API,
  deleteAttendance_API,
  updateAttendance_API
}